package com.baizhi.app.appcontroller;

import com.baizhi.app.appservice.CmfzArticleAppService;
import com.baizhi.entity.CmfzArticle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("app/article")
public class CmfzArticleAppController {
    @Autowired
    private CmfzArticleAppService cmfzArticleAppService;
    @GetMapping("selectAnyArticle")
    @ResponseBody
    public List<CmfzArticle> selectAnyArticle(String type){
        List<CmfzArticle> cmfzArticles = cmfzArticleAppService.selectAnyArticle(type);
        return cmfzArticles;
    }
}
